// 路由-相关模块
import Vue from 'vue'
import VueRouter from 'vue-router'
//将路由挂载到vue原型上
Vue.use(VueRouter)
import Home from '@/views/Home'
import Latout from '@/views/Layout'
import Play from '@/views/Play'
import Search from '@/views/Search'
const router = [
    {
        path: '/',
        redirect: '/Latout'
    },
    {
        path: '/Latout',
        component: Latout,
        redirect:'/Latout/Home',
        children: [
            {
                path: 'Home',
                component: Home,
                meta: { title:'首页' }
            },
            {
                path: 'Search',
                component: Search,
                meta:{title:'搜索'}
            },
        ]
    },
    {
        path: '/Play',
        component: Play
    },

]
const routes = new VueRouter({
    routes: router
})
export default routes